package com.bristua.barcode.supplier.controller;

import com.bristua.barcode.common.bean.Result;
import com.bristua.barcode.common.util.HandleResultUtil;
import com.bristua.barcode.supplier.biz.UnBindSupplierQRCodeBiz;
import com.bristua.barcode.supplier.enums.SupplierCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2019/8/30.
 */
@RestController
public class UnBindSupplierQRCodeController {

    @Autowired
    private UnBindSupplierQRCodeBiz unBindSupplierQRCodeBiz;

    @PostMapping(value = "/unbind/qrcode/{supplierId}/{qrcodeId}")
    public Result unBindSupplierQRCode(@PathVariable(value = "supplierId") String supplierId, @PathVariable(value = "qrcodeId") String qrcodeId){
        unBindSupplierQRCodeBiz.unBindSupplierQRcode(supplierId,qrcodeId);
        return HandleResultUtil.commonResult(SupplierCode.QRCODE_UN_BIND_SUCCESS.getCode(),SupplierCode.QRCODE_UN_BIND_SUCCESS.getMsg());
    }
}
